<template>
  <div>
    <el-button type="primary" @click="showDialog(1)">新增用户</el-button>
    <el-button type="success" @click="showDialog(2)">编辑用户</el-button>
    <Dialog ref = "DialogRef" />
  </div>
</template>

<script setup lang="ts">
import {ref} from 'vue'
import Dialog from './components/Dialog.vue'
const DialogRef = ref<any>();
const showDialog = (type: number) => {
  DialogRef.value?.openDialog(type)
}
</script>

<style scoped>
  
</style>
